package com.cskaoyan.controller.wx.sl;

import com.cskaoyan.service.wx.sl.WxRegionListService;
import com.cskaoyan.vo.BaseRespVo;
import com.cskaoyan.vo.wx.sl.WxRegionListVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class WxRegionListController {

    @Autowired
    WxRegionListService regionListService;

    //显示新建地址时的，各省市信息
    @RequestMapping("wx/region/list")
    public BaseRespVo regionList(Integer pid){
        List<WxRegionListVo> regionList = regionListService.queryRegionList(pid);
        return BaseRespVo.ok(regionList);
    }
}
